Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make placeholder accessible #6171

Merged
merged 8 commits into from
Jul 4, 2024
Merged

Make placeholder accessible #6171

merged 8 commits into from
Jul 4, 2024

Conversation

zurfyx
Copy link
Member

@zurfyx zurfyx commented May 24, 2024

Placeholder won't read to screen readers, it technically can be read but it is not in the expected position in the flow. Instead, it should use placeholder aria-placeholder on the contenteditable.

Placeholder is now part of the ContentEditable (backward compatible for now), for two reasons:

  1. It makes sense to couple the contenteditable with the placeholder. That's how native placeholder and input work.
  2. This is a common pitfall. By coupling them we can ensure that either these properties are provided or none (when there's no placeholder).

Before, doesn't read, interferes with the flow:

Screen.Recording.2024-05-24.at.3.15.28.PM.mov

After:

Screen.Recording.2024-05-24.at.3.28.28.PM.mov

Copy link

vercel bot commented May 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2024 10:47pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2024 10:47pm

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 24, 2024
Copy link

github-actions bot commented May 24, 2024

size-limit report 📦

Path Size
lexical - cjs 28.47 KB (0%)
lexical - esm 28.28 KB (0%)
@lexical/rich-text - cjs 36.86 KB (0%)
@lexical/rich-text - esm 28.08 KB (0%)
@lexical/plain-text - cjs 35.49 KB (0%)
@lexical/plain-text - esm 25.3 KB (0%)
@lexical/react - cjs 38.82 KB (0%)
@lexical/react - esm 29.27 KB (0%)

StyleT
StyleT previously approved these changes May 24, 2024
@Sahejkm Sahejkm added the extended-tests Run extended e2e tests on a PR label May 24, 2024
Fetz
Fetz previously approved these changes May 24, 2024
@etrepum
Copy link
Collaborator

etrepum commented May 25, 2024

I can't repro that integration test failure locally (likely has something to do with the github node cache behavior) but perhaps removing the --no-save --no-package-lock from the suite might fix it
https://github.com/facebook/lexical/blob/main/scripts/__tests__/integration/utils.js#L92

ivailop7
ivailop7 previously approved these changes May 27, 2024
potatowagon
potatowagon previously approved these changes May 28, 2024
potatowagon
potatowagon previously approved these changes Jun 19, 2024
@Sahejkm Sahejkm removed the extended-tests Run extended e2e tests on a PR label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants